# json
import shelve

s = shelve.open("test.txt")
s['x'] = ['an', 'b', 'c']
s['x'].append('d')
print(s['x'])  # ['an', 'b', 'c']
